﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Masters/DefaultTemplate.master"
    AutoEventWireup="true" CodeBehind="Consultation.aspx.cs" Inherits="TeamBuy.AccessWebUI.Help.Consultation" %>

<%@ Register src="../Components/Head_LoginLink.ascx" tagname="Head_LoginLink" tagprefix="uc1" %>
<%@ Register src="../Components/Head_RegLink.ascx" tagname="Head_RegLink" tagprefix="uc2" %>

<%@ Register src="../Components/DefaultPages/Side_TopAD.ascx" tagname="Side_TopAD" tagprefix="uc3" %>

<%@ Register src="../Components/DefaultPages/Side_TodayDeal.ascx" tagname="Side_TodayDeal" tagprefix="uc4" %>

<asp:Content ID="Content1" ContentPlaceHolderID="cphDefaultHead" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="cphDefault" runat="server">
    <div id="bdw" class="bdw">
        <div id="bd" class="cf">
            <div id="consult">
                <div id="content">
                    <div class="dashboard" id="dashboard">
                        <ul>
                            <li class="current"><a href="">美团答疑</a><span></span></li>
                            <li><a href="">求购转让</a><span></span></li>
                        </ul>
                    </div>
                    <div class="box clear">
                        <div class="box-top">
                        </div>
                        <div class="box-content">
                            <div class="head" id="consult-form-head">
                                <h2>
                                    美团答疑</h2>
                                <ul class="filter">
                                    <li <asp:Literal ID="ltlAllStyle" Text="class='current'" runat="server"></asp:Literal>><asp:LinkButton 
                                            ID="lbtnAll" runat="server" onclick="lbtnAll_Click">所有</asp:LinkButton></li>
                                    <li <asp:Literal ID="ltlMyStyle" runat="server"></asp:Literal>><asp:LinkButton 
                                            ID="lbtnMy" runat="server" onclick="lbtnMy_Click">我的提问</asp:LinkButton></li>
                                </ul>
                            </div>
                            <asp:Panel ID="pnlNotLogin" runat="server">
                                <div class="sect consult-form">
                                    请先<uc1:Head_LoginLink ID="Head_LoginLink2" runat="server" />或<uc2:Head_RegLink ID="Head_RegLink2" runat="server" />再提问
                                </div>
                            </asp:Panel>
                            <asp:Panel ID="pnlLogin" runat="server">
                                <div class="sect consult-form">
                                    <p class="intro">
                                        有问题请在此留言，我们会尽快为您解答</p>
                                    <asp:TextBox ID="txtQuestion" TextMode="MultiLine" Rows="5" cols="60" class="f-textarea" runat="server"></asp:TextBox>
                                    <asp:RequiredFieldValidator ID="rfvQuestion" runat="server" Display="Dynamic" ValidationGroup="Question" ControlToValidate="txtQuestion" ErrorMessage="请填写问题内容"></asp:RequiredFieldValidator>
                                    <p class="commit">
                                        <asp:Button ID="btnSubmitQuestion" runat="server" Text="好了，提交" 
                                            class="formbutton" onclick="btnSubmitQuestion_Click" ValidationGroup="Question" />
                                    </p>
                                    <div id="consult-add-succ" class="succ">
                                        <p>
                                            您的问题已成功提交，客服MM很快就会回复的，稍等一会儿再来看吧。</p>
                                        <p>
                                            <a href="">返回本团购</a>，或<a id="consult-add-more" href="javascript:void(0);">还有其他问题？</a>
                                            </p>
                                    </div>
                                </div>
                            </asp:Panel>
                            <div class="sect consult-list">
                            <ul class="list">
                                <asp:ListView ID="lvQuestion" runat="server" DataSourceID="adsQuestion">
                                    <AlternatingItemTemplate>
                                        <li id='<%#Eval("QuestionID") %>' class="alt">
                                            <div class="item">
                                                <p class="user">
                                                    <strong><%#Eval("UserName")%></strong><span><%#Eval("DateCreated") %></span></p>
                                                <div class="clear">
                                                </div>
                                                <p class="text">
                                                    <%#Eval("Question") %>    
                                                </p>
                                                <%#Eval("QuestionReply") != DBNull.Value && Convert.ToString(Eval("QuestionReply")) != "" && Convert.ToString(Eval("QuestionReply")) != null ? "<p class=\"reply\"><strong>回复：</strong>" + Eval("QuestionReply") + "</p>" : ""%>
                                            </div>
                                        </li>
                                    </AlternatingItemTemplate>
                                    <ItemTemplate>
                                        <li id='<%#Eval("QuestionID") %>'>
                                            <div class="item">
                                                <p class="user">
                                                    <strong><%#Eval("UserName") %></strong><span><%#Eval("DateCreated") %></span></p>
                                                <div class="clear">
                                                </div>
                                                <p class="text">
                                                    <%#Eval("Question") %>    
                                                </p>
                                                <%#Eval("QuestionReply") != DBNull.Value && Convert.ToString(Eval("QuestionReply")) != "" && Convert.ToString(Eval("QuestionReply")) != null ? "<p class=\"reply\"><strong>回复：</strong>" + Eval("QuestionReply") + "</p>" : ""%>
                                            </div>
                                        </li>
                                    </ItemTemplate>
                                    <EmptyDataTemplate>
                                        <div class="blank">您还没有提问过呢</div>
                                    </EmptyDataTemplate>
                                    <LayoutTemplate>
                                        <div id="itemPlaceholderContainer" runat="server" style="">
                                            <span id="itemPlaceholder" runat="server" />
                                        </div>
                                        <div style="">
                                        </div>
                                    </LayoutTemplate>
                                </asp:ListView>
                                <asp:AccessDataSource ID="adsQuestion" runat="server" DataFile="~/App_Data/TeamBuyData.mdb"></asp:AccessDataSource>
                            </ul>
                                <div class="paginator">
                                    <asp:DataPager ID="dpQuestion" runat="server" PagedControlID="lvQuestion" PageSize="20">
                                        <Fields>
                                            <asp:NextPreviousPagerField ShowFirstPageButton="True" ButtonCssClass="paginator_li paginator_li_a"
                                                ShowLastPageButton="false" ShowNextPageButton="False" FirstPageText="首页" NextPageText="下一页"
                                                PreviousPageText="上一页" />
                                            <asp:NumericPagerField CurrentPageLabelCssClass="paginator_li_current" NumericButtonCssClass="paginator_li paginator_li_a"
                                                ButtonCount="10" />
                                            <asp:NextPreviousPagerField ShowLastPageButton="false" ButtonCssClass="paginator_li paginator_li_a"
                                                ShowPreviousPageButton="False" NextPageText="下一页" PreviousPageText="上一页" />
                                        </Fields>
                                    </asp:DataPager>
                                </div>

                            </div>

                        </div>
                        <div class="box-bottom">
                                <div class="go-top">
                                    <a href="#doc"><span class="top-arrow">
                                        ↑</span>顶部</a></div>
                        </div>
                    </div>
                </div>
                <div id="sidebar">
                    <uc3:Side_TopAD ID="Side_TopAD1" runat="server" />
                    <uc4:Side_TodayDeal ID="Side_TodayDeal1" runat="server" />
                </div>
                
            </div>
        </div>
        <!-- bd end -->
    </div>
    <!-- bdw end -->
</asp:Content>
